<?php 
use Yii\helpers\Html;
use yii\bootstrap\Nav;


//菜单
$menuItem = [];
if ($access = Yii::$app->params['access']) {
    isset($access['SYSTEM']['COURSE']) && $menuItem[] = ['label' => '课程', 'url' => ['/system/course']];
    isset($access['SYSTEM']['LIVE']) && $menuItem[] = ['label' => '直播', 'url' => ['/system/live']];
    isset($access['SYSTEM']['DEFAULT']) && $menuItem[] = ['label' => '默认图片', 'url' => ['/system/default']];
} else {
    $menuItem = [
        ['label' => '课程', 'url' => ['/system/course']],
        ['label' => '直播', 'url' => ['/system/live']],
        ['label' => '默认图片', 'url' => ['/system/default']],
    ];
}


echo Nav::widget([
    'options' => ['class' => 'nav nav-tabs mbm'],
    'items' => $menuItem,
]);

?>